﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;

namespace CONTROLLER {
    class Security {
        public string encrypt(string value) {
            MD5CryptoServiceProvider x = new System.Security.Cryptography.MD5CryptoServiceProvider();
            byte[] data = Encoding.ASCII.GetBytes(value);
            data = x.ComputeHash(data);
            string md5Hash = Encoding.ASCII.GetString(data);

            return md5Hash;
        }
    }
}
